package com.breeze.components.core.util.json.serializer;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import java.io.IOException;

/**
 * 默认Long序列化为字符串,如果不需要序列化字符串用这个
 *
 * @author breeze
 */
public class LongTypeSerializer extends JsonSerializer<Long> {

  @Override
  public void serialize(Long value, JsonGenerator gen, SerializerProvider serializers)
      throws IOException {
    gen.writeNumber(value);
  }
}
